use std::collections::HashMap;

use crate::engine::ISystem;

pub struct Component {
    pub tag: String,
}

impl Component {
    pub fn new(tag: &str) -> Self {
        Self {
            tag: tag.into(),
        }
    }
}

pub struct System {
    components: HashMap<usize, Component>,
}

impl System {
    pub fn new() -> Self {
        Self {
            components: HashMap::new(),
        }
    }
}

impl ISystem<Component> for System {
    fn components(&self) -> &HashMap<usize, Component> {
        &self.components
    }

    fn components_mut(&mut self) -> &mut HashMap<usize, Component> {
        &mut self.components
    }
}
